package com.pur.zsms.note.service.impl;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import net.sf.cglib.beans.BeanCopier;

import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;

import com.pur.zsms.common.exception.GenericException;
import com.pur.zsms.common.support.PageController;
import com.pur.zsms.common.support.PaginationSupport;
import com.pur.zsms.common.util.CipherUtil;
import com.pur.zsms.common.util.PubFun;
import com.pur.zsms.foodmanage.food.po.FoodPo;
import com.pur.zsms.foodmanage.food.vo.FoodVo;
import com.pur.zsms.note.Note;
import com.pur.zsms.note.NoteForSup;
import com.pur.zsms.note.NoteForUpdateSup;
import com.pur.zsms.note.service.INoteService;
import com.pur.zsms.pmsnmanage.menu.po.MenuPo;
import com.pur.zsms.pmsnmanage.role.dao.IRoleDao;
import com.pur.zsms.pmsnmanage.role.po.RolePo;
import com.pur.zsms.pmsnmanage.role.vo.RoleVo;
import com.pur.zsms.pmsnmanage.user.dao.IUserDao;
import com.pur.zsms.pmsnmanage.user.po.LdAddressPo;
import com.pur.zsms.pmsnmanage.user.po.UserLevelPo;
import com.pur.zsms.pmsnmanage.user.po.UserPo;
import com.pur.zsms.pmsnmanage.user.po.UserRolePo;
import com.pur.zsms.pmsnmanage.user.service.IUserService;
import com.pur.zsms.pmsnmanage.user.vo.LdAddressVo;
import com.pur.zsms.pmsnmanage.user.vo.UserVo;
import com.pur.zsms.shopmanage.dao.IShopDao;
import com.pur.zsms.shopmanage.po.ShopPo;
import com.pur.zsms.shopmanage.po.ShopRaisePricePo;
import com.pur.zsms.shopmanage.po.ShopUserPo;
import com.pur.zsms.shopmanage.service.IShopService;
import com.pur.zsms.shopmanage.vo.ShopRaisePriceVo;
import com.pur.zsms.shopmanage.vo.ShopVo;
import com.pur.zsms.supplier.dao.SupplierDao;
import com.pur.zsms.supplier.dao.SupplierOrderDao;
import com.pur.zsms.supplier.po.SupplierPo;
import com.pur.zsms.supplier.vo.SupplierVo;
import com.pur.zsms.systemsetting.datadictionary.po.Code;

@Service("noteService")
public class NoteServiceImpl implements INoteService {

	String msg = "";

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	@Resource(name = "supplierOrderDao")
	private SupplierOrderDao supplierOrderDao;

	public SupplierOrderDao getSupplierOrderDao() {
		return supplierOrderDao;
	}

	public void setSupplierOrderDao(SupplierOrderDao supplierOrderDao) {
		this.supplierOrderDao = supplierOrderDao;
	}

	public void sendMessageToSup(String ordId, String ordDate, String shopName) throws GenericException {
		NoteForSup noteForSup = new NoteForSup(ordId, ordDate, shopName, supplierOrderDao);

		noteForSup.start();
	}

	public void sendMessageToSup(String ordId, String materId, String supId, String shopName)
	        throws GenericException {
		NoteForUpdateSup noteForSup = new NoteForUpdateSup(ordId, materId,supId, shopName, supplierOrderDao);

		noteForSup.start();

	}

	public void sendMessageToPurchase(String content, String mobile) throws GenericException {
		Note note = new Note(content, mobile);
		note.start();
	}

}
